This is a notebook processing the questionnaire responses for social audit work done with the residents of Sri Tanjung Apartment in USJ 16.
Text in quoted blocks like this as well as data presented in tabular form and graphs can be copied and used in final report
Quick setup to load the data
%matplotlib inline
import csv
from functools import reduce
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sinar_social_audit_2020 import preprocessor, fields, distribution, relation
plt.rcParams['figure.figsize'] = [10, 8]
with open("./responses.csv", "r") as file_responses:
reader_responses = csv.reader(file_responses)
headers = tuple(preprocessor.field_name(field) for field in next(reader_responses))
df = pd.DataFrame(data=reader_responses, columns=headers, dtype=str)
These are the distribution of responses for each questions (some further broken down as needed).
The following cell shows the distribution of gender, unfortunately, as the field was only added after some time the questionnaire went online so. In total there were 28 entries where gender isn't captured.
print(
"{} entries with no gender information.".format(
df[df[fields.FIELD_GENDER] == ""][fields.FIELD_GENDER].count()
)
)
normalized_gender, summary_gender = distribution.distinct(
df, fields.FIELD_GENDER, "Gender"
)
28 entries with no gender information.
| Frequency | |
|---|---|
| Gender | |
| Lelaki | 29 |
| Memilih tidak menjawab | 1 |
| Perempuan | 52 |
| not captured | 28 |
The following cell shows the age distribution of the respondent.
normalized_age, summary_age = distribution.number(
df, fields.FIELD_AGE, "Age", (0, 10, 20, 30, 40, 50, 60)
)
| Frequency | |
|---|---|
| Age | |
| (-0.001, 10.0] | 1 |
| (10.0, 20.0] | 5 |
| (20.0, 30.0] | 24 |
| (30.0, 40.0] | 53 |
| (40.0, 50.0] | 23 |
| (50.0, 60.0] | 4 |
The following shows the distribution of education level
normalized_edulevel, summary_edulevel = distribution.distinct(
df, fields.FIELD_EDUCATION_LEVEL, "Education level"
)
| Frequency | |
|---|---|
| Education level | |
| Institusi pengajian tinggi | 61 |
| Memilih untuk tidak menjawab | 2 |
| Sekolah menengah | 47 |
The following shows the distribution of employment
normalized_employment, summary_employment = distribution.distinct(
df,
fields.FIELD_EMPLOYMENT_STATUS,
"Employment status",
preprocessor.employment_status,
)
| Frequency | |
|---|---|
| Employment status | |
| Bekerja dengan bergaji (sepenuh masa/ separuh masa) | 66 |
| Bekerja sendiri/ pemilik perniagaan | 16 |
| Memilih tidak menjawab | 3 |
| Menganggur / tidak bekerja ( tiada kerja / sedang mencari kerja) | 11 |
| Pelajar (sepenuh masa /separuh masa) | 6 |
| Tentera / Polis / Badan Beruniform | 1 |
| surirumah | 7 |
The following cell shows the distribution of household income and the respective histogram.
normalized_income, summary_income = distribution.number(
df, fields.FIELD_HOUSEHOLD_INCOME, "Household income", 8, preprocessor.income
)
| Frequency | |
|---|---|
| Household income | |
| (-8.001, 1000.0] | 8 |
| (1000.0, 2000.0] | 27 |
| (2000.0, 3000.0] | 33 |
| (3000.0, 4000.0] | 25 |
| (4000.0, 5000.0] | 8 |
| (5000.0, 6000.0] | 4 |
| (6000.0, 7000.0] | 3 |
| (7000.0, 8000.0] | 2 |
The following shows the distribution of family size
normalized_family_size, summary_family_size = distribution.distinct(
df,
fields.FIELD_FAMILY_SIZE,
"Family size",
lambda x: preprocessor.value_integer(x)
if preprocessor.value_integer(x) <= 10
else np.nan,
)
| Frequency | |
|---|---|
| Family size | |
| 1.0 | 3 |
| 2.0 | 18 |
| 3.0 | 23 |
| 4.0 | 19 |
| 5.0 | 21 |
| 6.0 | 10 |
| 7.0 | 10 |
| 8.0 | 4 |
| 10.0 | 1 |
The following shows how respondents access government services, please note that the options are not mutually exclusive
normalized_public_access_method, summary_public_access_method = distribution.mcq(
df,
fields.FIELD_PUBLIC_ACCESS_METHOD,
"Access method",
(
"Pejabat jabatan kerajaan",
"Pusat tumpuan perkhidmatan kerajaan (spt UTC dan RTC)",
"Kaunter/Pejabat bergerak perkhidmatan kerajaan",
"Dalam talian",
),
)
| Frequency | |
|---|---|
| Access method | |
| Pejabat jabatan kerajaan | 32 |
| Pusat tumpuan perkhidmatan kerajaan (spt UTC dan RTC) | 24 |
| Kaunter/Pejabat bergerak perkhidmatan kerajaan | 11 |
| Dalam talian | 80 |
normalized_owned_devices, summary_owned_devices = distribution.mcq(
df,
fields.FIELD_OWNED_DEVICES,
"Owned devices",
(
"Komputer desktop",
"Laptop(termasuk kompter riba dan netbook)",
"Tablet (iPad, galaxy tab, dll)",
"Konsol permainan (Playstation, Nintendo Switch, Xbox)",
"Telefon pintar",
"smart tv",
"Android box",
),
)
| Frequency | |
|---|---|
| Owned devices | |
| Komputer desktop | 19 |
| Laptop(termasuk kompter riba dan netbook) | 48 |
| Tablet (iPad, galaxy tab, dll) | 23 |
| Konsol permainan (Playstation, Nintendo Switch, Xbox) | 8 |
| Telefon pintar | 108 |
| smart tv | 1 |
| Android box | 1 |
normalized_sufficient_usage, summary_sufficient_usage = distribution.distinct(
df, fields.FIELD_SUFFICIENT_USAGE, "Sufficient usage"
)
| Frequency | |
|---|---|
| Sufficient usage | |
| Tidak | 33 |
| Tidak pasti/ tidak tahu | 9 |
| Ya | 68 |
normalized_used_public_wifi, summary_used_public_wifi = distribution.distinct(
df, fields.FIELD_USED_PUBLIC_WIFI, "Used public wifi"
)
| Frequency | |
|---|---|
| Used public wifi | |
| Tidak | 54 |
| Tidak pasti/ tidak tahu | 4 |
| Ya | 52 |
normalized_used_selangor_wifi, summary_used_selangor_wifi = distribution.distinct(
df, fields.FIELD_USED_SELANGOR_WIFI, "Used government WiFi"
)
| Frequency | |
|---|---|
| Used government WiFi | |
| Tidak | 70 |
| Tidak pasti/ tidak tahu | 6 |
| Ya | 34 |
normalized_wfh, summary_wfh = distribution.distinct(
df, fields.FIELD_CAN_WORK_FROM_HOME, "Able to WFH"
)
| Frequency | |
|---|---|
| Able to WFH | |
| Tidak | 18 |
| Tidak pasti/ tidak tahu | 19 |
| Ya | 73 |
normalized_comfortable_wfh, summary_comfortable_wfh = distribution.distinct(
df, fields.FIELD_COMFY_WORK_FROM_HOME, "Comfortable WFH"
)
| Frequency | |
|---|---|
| Comfortable WFH | |
| Tidak | 31 |
| Tidak pasti/ tidak tahu | 18 |
| Ya | 61 |
normalized_can_elearn, summary_can_elearn = distribution.distinct(
df, fields.FIELD_FAMILY_CAN_ELEARN, "Can elearn"
)
| Frequency | |
|---|---|
| Can elearn | |
| Tidak | 25 |
| Tidak pasti/ tidak tahu | 13 |
| Ya | 72 |
normalized_comfortable_elearn, summary_comfortable_elearn = distribution.distinct(
df, fields.FIELD_COMFY_ELEARN, "Comfortable elearn"
)
| Frequency | |
|---|---|
| Comfortable elearn | |
| Tidak | 37 |
| Tidak pasti/ tidak tahu | 23 |
| Ya | 50 |
normalized_budget_internet, summary_budget_internet = distribution.number(
df, fields.FIELD_BUDGET_INTERNET, "budget internet", range(0, 501, 50)
)
| Frequency | |
|---|---|
| budget internet | |
| (-0.001, 50.0] | 64 |
| (50.0, 100.0] | 34 |
| (100.0, 150.0] | 3 |
| (150.0, 200.0] | 5 |
| (200.0, 250.0] | 0 |
| (250.0, 300.0] | 0 |
| (300.0, 350.0] | 0 |
| (350.0, 400.0] | 0 |
| (400.0, 450.0] | 0 |
| (450.0, 500.0] | 1 |
normalized_budget_computer, summary_budget_computer = distribution.number(
df, fields.FIELD_BUDGET_COMPUTER, "budget computer", range(0, 801, 100)
)
| Frequency | |
|---|---|
| budget computer | |
| (-0.001, 100.0] | 14 |
| (100.0, 200.0] | 7 |
| (200.0, 300.0] | 7 |
| (300.0, 400.0] | 0 |
| (400.0, 500.0] | 11 |
| (500.0, 600.0] | 0 |
| (600.0, 700.0] | 6 |
| (700.0, 800.0] | 3 |
normalized_budget_mobile, summary_budget_mobile = distribution.number(
df, fields.FIELD_BUDGET_MOBILE, "budget mobile", range(0, 801, 100)
)
| Frequency | |
|---|---|
| budget mobile | |
| (-0.001, 100.0] | 18 |
| (100.0, 200.0] | 7 |
| (200.0, 300.0] | 9 |
| (300.0, 400.0] | 2 |
| (400.0, 500.0] | 23 |
| (500.0, 600.0] | 5 |
| (600.0, 700.0] | 5 |
| (700.0, 800.0] | 7 |
normalized_device_wish, summary_device_wish = distribution.mcq(
df,
fields.FIELD_DEVICE_WISH,
"essential device",
("Kemudahan Internet", "Komputer/ laptop", "Kemudahan cetak / printer"),
lambda x: 'Kemudahan Internet, Komputer/ laptop, Kemudahan cetak / printer' if x == 'semua di atas' else x
)
| Frequency | |
|---|---|
| essential device | |
| Kemudahan Internet | 86 |
| Komputer/ laptop | 53 |
| Kemudahan cetak / printer | 45 |
normalized_device_wish_more, summary_device_wish_more = distribution.mcq(
df,
fields.FIELD_DEVICE_WISH_MORE,
"essential",
(
"cellphone",
"computer",
"printer",
"wifi",
"internet (free) service",
"internet service",
"laptop",
"monetary assistance",
"smart tv",
"smartphone",
"speaker",
"telephony service",
"television",
"internet (unlimited) service",
),
preprocessor.essential_wishlist,
)
| Frequency | |
|---|---|
| essential | |
| cellphone | 1 |
| computer | 7 |
| printer | 9 |
| wifi | 3 |
| internet (free) service | 2 |
| internet service | 7 |
| laptop | 10 |
| monetary assistance | 2 |
| smart tv | 1 |
| smartphone | 1 |
| speaker | 1 |
| telephony service | 1 |
| television | 1 |
| internet (unlimited) service | 1 |
normalized_challenge_device, summary_challenge_device = distribution.ranking(
df,
[
fields.FIELD_INTERNET_PROBLEM_DEVICE_EXPENSIVE,
fields.FIELD_INTERNET_PROBLEM_NO_DEVICE,
fields.FIELD_INTERNET_PROBLEM_MANY_BATTERIES,
fields.FIELD_INTERNET_PROBLEM_ACCESS_PROBLEM,
],
("A", "B", "C", "D"),
)
| internet_problem_device_expensive | internet_problem_no_device | internet_problem_many_batteries | internet_problem_access_problem | |
|---|---|---|---|---|
| A | 67 | 31 | 34 | 55 |
| B | 26 | 38 | 41 | 31 |
| C | 12 | 36 | 27 | 18 |
| D | 5 | 5 | 8 | 6 |
normalized_challenge_service, summary_challenge_service = distribution.ranking(
df,
[
fields.FIELD_INTERNET_PROBLEM_SERVICE_EXPENSIVE,
fields.FIELD_INTERNET_PROBLEM_NO_COVERAGE,
],
("A", "B", "C", "D"),
)
| internet_problem_service_expensive | internet_problem_no_coverage | |
|---|---|---|
| A | 58 | 55 |
| B | 34 | 32 |
| C | 15 | 14 |
| D | 3 | 9 |
normalized_challenge_tech, summary_challenge_tech = distribution.ranking(
df,
[
fields.FIELD_INTERNET_PROBLEM_NO_TIME_LEARN,
fields.FIELD_INTERNET_PROBLEM_TECHNOLOGY_BARRIER,
fields.FIELD_INTERNET_PROBLEM_NO_CONFIDENCE_INTERNET,
fields.FIELD_INTERNET_PROBLEM_NO_INTERNET_SKILL,
fields.FIELD_INTERNET_PROBLEM_NO_TEACHING,
],
["A", "B", "C", "D"],
)
| internet_problem_no_time_learn | internet_problem_technology_barrier | internet_problem_no_confidence_internet | internet_problem_no_internet_skill | internet_problem_no_teaching | |
|---|---|---|---|---|---|
| A | 14 | 16 | 10 | 13 | 14 |
| B | 37 | 35 | 33 | 36 | 34 |
| C | 48 | 47 | 54 | 49 | 51 |
| D | 11 | 12 | 13 | 12 | 11 |
normalized_challenge_literacy, summary_challenge_literacy = distribution.ranking(
df,
[
fields.FIELD_INTERNET_PROBLEM_LANGUAGE_BARRIER,
fields.FIELD_INTERNET_PROBLEM_READ_WRITE_PROBLEM,
],
["A", "B", "C", "D"],
)
| internet_problem_language_barrier | internet_problem_read_write_problem | |
|---|---|---|
| A | 16 | 11 |
| B | 33 | 32 |
| C | 38 | 55 |
| D | 23 | 12 |
normalized_challenge_privacy, summary_challenge_privacy = distribution.ranking(
df,
[
fields.FIELD_INTERNET_PROBLEM_STRANGER_FEAR,
fields.FIELD_INTERNET_PROBLEM_CONTENT_FEAR,
fields.FIELD_INTERNET_PROBLEM_IDENTITY_THEFT,
],
["A", "B", "C", "D"],
)
| internet_problem_stranger_fear | internet_problem_content_fear | internet_problem_identity_theft | |
|---|---|---|---|
| A | 17 | 26 | 30 |
| B | 37 | 33 | 40 |
| C | 42 | 40 | 29 |
| D | 14 | 11 | 11 |
normalized_challenge_other, summary_challenge_other = distribution.ranking(
df,
[
fields.FIELD_INTERNET_PROBLEM_NO_TIME_ACCESS,
fields.FIELD_INTERNET_PROBLEM_DISINTERESTED,
fields.FIELD_INTERNET_PROBLEM_NO_PERMISSION,
],
["A", "B", "C", "D"],
)
| internet_problem_no_time_access | internet_problem_disinterested | internet_problem_no_permission | |
|---|---|---|---|
| A | 12 | 18 | 8 |
| B | 37 | 30 | 33 |
| C | 49 | 49 | 55 |
| D | 12 | 13 | 14 |
options = (
(
"Komunikasi berdasarkan “satu ke satu” (menggunakan mesej segera, chat, hantar/terima e-mel, panggilan video, panggilan suara)",
"p2p communication",
),
(
"Tujuan sosial/ komunikasi ke ramai orang serentak (menhantar mesej ke kumpulan Whatsapp / Telegram, berkongsi gambar / video / muzik di internet, mengakses media sosial seperti Facebook)",
"social networking",
),
(
"Hiburan (spt. bermain online game, mendengar radio atau menonton video / TV / filem /muzik, atau membaca berita hiburan dan gosip)",
"entertainment",
),
("Untuk nasihat dan maklumat perubatan / kesihatan", "health"),
(
"Mencari maklumat (spt melayari internet, membaca berita atau memeriksa cuaca, membaca maklumat dan artikel sukan terkini, kajian, dan mencari maklumat untuk tujuan peribadi)",
"research",
),
("Pendidikan (kursus latihan online, sokongan untuk kerja sekolah)", "education"),
(
"Membeli barang (mengkaji barangan atau memesan dan membeli barangan dalam talian)",
"shopping",
),
("Perbankan dan perkhidmatan kewangan (menghantar dan menerima wang)", "banking"),
("Menyuarakan pendapat terhadap isu yang diambil berat", "activism"),
(
"Membuat dan berkongsi / menerbitkan kontent yang boleh dihasilkan sendiri (gambar, blog, video, game, applikasi, kontent social media, article online dan berita)",
"content creating",
),
("Mencari kerja / nasihat kerjaya", "career"),
(
"Menyokong perusahaan sendiri (pengliklanan, menghubungi pelanggan, membeli barang dan servis online, mengkaji harga barangan)",
"ecommerce",
),
("Tidak pasti / tidak tahu", "unsure"),
("pendidikan anak home learns", "education"),
)
def goal_preprocess(item):
return reduce(
lambda current, incoming: current.replace(incoming[0], incoming[-1]),
options,
item,
)
normalized_goals, summary_goals = distribution.mcq(
df,
fields.FIELD_INTERNET_GOAL,
"goals",
set(option[-1] for option in options),
goal_preprocess,
)
| Frequency | |
|---|---|
| goals | |
| banking | 93 |
| career | 62 |
| activism | 51 |
| unsure | 1 |
| research | 98 |
| ecommerce | 66 |
| p2p communication | 98 |
| shopping | 79 |
| entertainment | 70 |
| health | 78 |
| social networking | 94 |
| content creating | 47 |
| education | 88 |
normalized_frequent_web, summary_frequent_web = distribution.mcq(
df,
fields.FIELD_MONTHLY_SOCIAL_MEDIA,
"frequently accessed",
(
"Facebook",
"Whatsapp",
"Telegram",
"Instagram",
"Shopee",
"Wechat",
"Tiktok",
"Twitter",
"LinkedIn",
"Lazada",
"Google Meet",
"Jobstreet",
),
)
| Frequency | |
|---|---|
| frequently accessed | |
| 86 | |
| 88 | |
| Telegram | 71 |
| 79 | |
| Shopee | 0 |
| 10 | |
| Tiktok | 25 |
| 32 | |
| 12 | |
| Lazada | 46 |
| Google Meet | 1 |
| Jobstreet | 1 |
normalized_isp, summary_isp = distribution.mcq(
df,
fields.FIELD_ISP_TYPE,
"isp",
(
"Rangkaian mudah alih / SIM card",
"Talian internet tetap /optik fibre",
"Wifi percuma",
"Wifi di tempat kerja / institusi pendidikan",
),
)
| Frequency | |
|---|---|
| isp | |
| Rangkaian mudah alih / SIM card | 98 |
| Talian internet tetap /optik fibre | 30 |
| Wifi percuma | 14 |
| Wifi di tempat kerja / institusi pendidikan | 25 |
normalized_change_social, summary_change_social = distribution.ranking(
df,
[
fields.FIELD_SOCIAL_BETTER_COMMUNICATION,
fields.FIELD_SOCIAL_BETTER_ENTERTAINMENT,
fields.FIELD_SOCIAL_NEGLECT_FAMILY_FRIENDS,
],
("Sangat Setuju", "Setuju", "Neutral", "Tidak Setuju", "Sangat tidak setuju"),
)
| social_better_communication | social_better_entertainment | social_neglect_family_friends | |
|---|---|---|---|
| Sangat Setuju | 75 | 54 | 18 |
| Setuju | 30 | 41 | 37 |
| Neutral | 4 | 13 | 26 |
| Tidak Setuju | 1 | 2 | 22 |
| Sangat tidak setuju | 0 | 0 | 7 |
normalized_change_financial, summary_change_financial = distribution.ranking(
df,
[
fields.FIELD_BUDGETING_MORE_OPPORTUNITIES,
fields.FIELD_BUDGETING_BETTER_PLAN,
fields.FIELD_BUDGETING_MORE_INCOME,
fields.FIELD_BUDGETING_MORE_SPENDING,
],
("Sangat Setuju", "Setuju", "Neutral", "Tidak Setuju", "Sangat tidak setuju"),
)
| budgeting_more_opportunities | budgeting_better_plan | budgeting_more_income | budgeting_more_spending | |
|---|---|---|---|---|
| Sangat Setuju | 53 | 46 | 36 | 20 |
| Setuju | 41 | 44 | 43 | 35 |
| Neutral | 15 | 16 | 27 | 30 |
| Tidak Setuju | 1 | 3 | 3 | 18 |
| Sangat tidak setuju | 0 | 1 | 1 | 7 |
normalized_change_access, summary_change_access = distribution.ranking(
df,
[
fields.FIELD_ACCESS_FOLLOW_NEWS,
fields.FIELD_ACCESS_BETTER_HEALTH_SERVICE,
fields.FIELD_ACCESS_BETTER_OPPORTUNITY,
fields.FIELD_ACCESS_BETTER_PUBLIC_SERVICE,
],
("Sangat Setuju", "Setuju", "Neutral", "Tidak Setuju", "Sangat tidak setuju"),
)
| access_follow_news | access_better_health_service | access_better_opportunity | access_better_public_service | |
|---|---|---|---|---|
| Sangat Setuju | 69 | 66 | 67 | 68 |
| Setuju | 36 | 42 | 37 | 33 |
| Neutral | 4 | 1 | 4 | 7 |
| Tidak Setuju | 1 | 1 | 2 | 2 |
| Sangat tidak setuju | 0 | 0 | 0 | 0 |
normalized_change_awareness, summary_change_awareness = distribution.ranking(
df,
[
fields.FIELD_AWARENESS_MORE_RESPECTED,
fields.FIELD_AWARENESS_MORE_CONFIDENCE,
fields.FIELD_AWARENESS_MORE_PROUD,
fields.FIELD_AWARENESS_MORE_VOICE,
fields.FIELD_AWARENESS_MORE_CONTROLLED,
fields.FIELD_AWARENESS_MORE_CONSTRAINED,
],
("Sangat Setuju", "Setuju", "Neutral", "Tidak Setuju", "Sangat tidak setuju"),
)
| awareness_more_respected | awareness_more_confidence | awareness_more_proud | awareness_more_voice | awareness_more_controlled | awareness_more_constrained | |
|---|---|---|---|---|---|---|
| Sangat Setuju | 18 | 27 | 24 | 28 | 16 | 11 |
| Setuju | 48 | 54 | 58 | 57 | 28 | 26 |
| Neutral | 38 | 26 | 25 | 22 | 30 | 27 |
| Tidak Setuju | 6 | 3 | 3 | 3 | 25 | 29 |
| Sangat tidak setuju | 0 | 0 | 0 | 0 | 11 | 17 |
normalized_opinion_family, summary_opinion_family = distribution.ranking(
df,
[
fields.FIELD_INTERNET_OPINION_WIFE_CHECK_HUSBAND,
fields.FIELD_INTERNET_OPINION_HUSBAND_CHECK_WIFE,
fields.FIELD_INTERNET_OPINION_FEMALE_SAFETY,
],
("Sangat Setuju", "Setuju", "Neutral", "Tidak Setuju", "Sangat tidak setuju"),
)
| internet_opinion_wife_check_husband | internet_opinion_husband_check_wife | internet_opinion_female_safety | |
|---|---|---|---|
| Sangat Setuju | 28 | 29 | 12 |
| Setuju | 43 | 40 | 35 |
| Neutral | 28 | 29 | 34 |
| Tidak Setuju | 10 | 10 | 20 |
| Sangat tidak setuju | 1 | 2 | 9 |
normalized_opinion_personal, summary_opinion_personal = distribution.ranking(
df,
[
fields.FIELD_INTERNET_OPINION_INSECURE_WITHOUT,
fields.FIELD_INTERNET_OPINION_INTERNET_MORE_CONFUSION,
fields.FIELD_INTERNET_OPINION_INTERNET_FEEL_SAFE,
fields.FIELD_INTERNET_OPINION_TRUST_INFO,
fields.FIELD_INTERNET_OPINION_CHANGE_LIFE,
fields.FIELD_INTERNET_OPINION_WASTE_TIME,
fields.FIELD_INTERNET_OPINION_SELECTED_NEED,
],
("Sangat Setuju", "Setuju", "Neutral", "Tidak Setuju", "Sangat tidak setuju"),
)
| internet_opinion_insecure_without | internet_opinion_internet_more_confusion | internet_opinion_internet_feel_safe | internet_opinion_trust_info | internet_opinion_change_life | internet_opinion_waste_time | internet_opinion_selected_need | |
|---|---|---|---|---|---|---|---|
| Sangat Setuju | 29 | 15 | 22 | 18 | 25 | 14 | 12 |
| Setuju | 46 | 32 | 47 | 54 | 52 | 41 | 43 |
| Neutral | 25 | 30 | 36 | 34 | 29 | 31 | 23 |
| Tidak Setuju | 8 | 28 | 5 | 4 | 4 | 21 | 26 |
| Sangat tidak setuju | 2 | 5 | 0 | 0 | 0 | 3 | 6 |
normalized_challenge_tech, summary_challenge_tech = distribution.ranking(
df,
[
fields.FIELD_INTERNET_PROBLEM_STRANGER_FEAR,
fields.FIELD_INTERNET_PROBLEM_CONTENT_FEAR,
fields.FIELD_INTERNET_PROBLEM_IDENTITY_THEFT,
],
['A', 'B', 'C', 'D']
)
| internet_problem_stranger_fear | internet_problem_content_fear | internet_problem_identity_theft | |
|---|---|---|---|
| A | 17 | 26 | 30 |
| B | 37 | 33 | 40 |
| C | 42 | 40 | 29 |
| D | 14 | 11 | 11 |
normalized_experience_harassment, summary_experience_harassment = distribution.ranking(
df,
[
fields.FIELD_EXPERIENCE_HARASSMENT,
fields.FIELD_EXPERIENCE_THREAT,
fields.FIELD_EXPERIENCE_INAPPROPRIATE,
fields.FIELD_EXPERIENCE_DOXX,
],
(
"Sentiasa",
"Sering kali",
"Kadang kala",
"Tidak pernah",
"Tidak pasti/tidak tahu",
),
)
| experience_harassment | experience_threat | experience_inappropriate | experience_doxx | |
|---|---|---|---|---|
| Sentiasa | 6 | 7 | 7 | 8 |
| Sering kali | 34 | 28 | 32 | 29 |
| Kadang kala | 26 | 18 | 31 | 19 |
| Tidak pernah | 36 | 52 | 33 | 46 |
| Tidak pasti/tidak tahu | 8 | 5 | 7 | 8 |
normalized_opinion_personal, summary_opinion_personal = distribution.ranking(
df,
[
fields.FIELD_AGREE_ON_PRIVACY,
fields.FIELD_AGREE_ON_INAPPROPRIATE,
fields.FIELD_AGREE_ON_STRANGER,
],
("Sangat Setuju", "Setuju", "Neutral", "Tidak Setuju", "Sangat tidak setuju"),
)
| agree_on_privacy | agree_on_inappropriate | agree_on_stranger | |
|---|---|---|---|
| Sangat Setuju | 35 | 36 | 35 |
| Setuju | 47 | 46 | 48 |
| Neutral | 23 | 19 | 20 |
| Tidak Setuju | 4 | 7 | 6 |
| Sangat tidak setuju | 1 | 2 | 1 |
normalized_family_permission, summary_family_permission = distribution.distinct(
df, fields.FIELD_AGREE_ON_FAMILY_DISPROVAL, "family disproval"
)
| Frequency | |
|---|---|
| family disproval | |
| Neutral | 22 |
| Sangat Setuju | 7 |
| Sangat tidak setuju | 15 |
| Setuju | 28 |
| Tidak Setuju | 38 |
This is the part where I start calculating correlation.
We fail to reject the hypothesis where there household income is independent from the method used to access the government service at alpha value being set to 0.05 (Which means the same conclusion can be drawn 95% of the time should this study is repeated). Therefore no further study was conducted to test for correlation between the two factors.
income_vs_public_access_method = relation.interval_vs_mcq(
normalized_income,
normalized_public_access_method,
summary_income.index,
)
relation.independence_check(income_vs_public_access_method, 0.05)
| Pejabat jabatan kerajaan | Pusat tumpuan perkhidmatan kerajaan (spt UTC dan RTC) | Kaunter/Pejabat bergerak perkhidmatan kerajaan | Dalam talian | |
|---|---|---|---|---|
| Household income | ||||
| (-8.001, 1000.0] | 3 | 1 | 0 | 4 |
| (1000.0, 2000.0] | 7 | 7 | 6 | 18 |
| (2000.0, 3000.0] | 8 | 6 | 0 | 25 |
| (3000.0, 4000.0] | 6 | 6 | 3 | 19 |
| (4000.0, 5000.0] | 5 | 2 | 0 | 5 |
| (5000.0, 6000.0] | 2 | 2 | 2 | 4 |
| (6000.0, 7000.0] | 0 | 0 | 0 | 3 |
| (7000.0, 8000.0] | 1 | 0 | 0 | 2 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=19.30038826772428 < 32.670573340917315
True
We fail to reject the hypothesis where there household income is independent from the ownership of different types of devices at alpha value being set to 0.05.
income_vs_ownership = relation.interval_vs_mcq(
normalized_income,
normalized_owned_devices,
summary_income.index
)
relation.independence_check(income_vs_ownership, 0.05)
| Komputer desktop | Laptop(termasuk kompter riba dan netbook) | Tablet (iPad, galaxy tab, dll) | Konsol permainan (Playstation, Nintendo Switch, Xbox) | Telefon pintar | smart tv | Android box | |
|---|---|---|---|---|---|---|---|
| Household income | |||||||
| (-8.001, 1000.0] | 0 | 3 | 0 | 0 | 8 | 0 | 0 |
| (1000.0, 2000.0] | 2 | 6 | 3 | 0 | 26 | 0 | 0 |
| (2000.0, 3000.0] | 6 | 15 | 8 | 3 | 33 | 1 | 1 |
| (3000.0, 4000.0] | 2 | 12 | 4 | 3 | 25 | 0 | 0 |
| (4000.0, 5000.0] | 3 | 3 | 4 | 0 | 7 | 0 | 0 |
| (5000.0, 6000.0] | 3 | 4 | 1 | 0 | 4 | 0 | 0 |
| (6000.0, 7000.0] | 1 | 3 | 2 | 2 | 3 | 0 | 0 |
| (7000.0, 8000.0] | 2 | 2 | 1 | 0 | 2 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=37.978699912975614 < 58.12403768086803
True
We fail to reject the hypothesis where there household income is independent from whether respondents get to access the internet as much as he/she desires at alpha value being set to 0.05.
income_vs_sufficient_usage = relation.interval_vs_distinct(
normalized_income,
normalized_sufficient_usage,
summary_income.index
)
relation.independence_check(income_vs_sufficient_usage, 0.05)
| Tidak | Ya | Tidak pasti/ tidak tahu | |
|---|---|---|---|
| Household income | |||
| (-8.001, 1000.0] | 2 | 5 | 1 |
| (1000.0, 2000.0] | 5 | 16 | 6 |
| (2000.0, 3000.0] | 12 | 21 | 0 |
| (3000.0, 4000.0] | 9 | 14 | 2 |
| (4000.0, 5000.0] | 2 | 6 | 0 |
| (5000.0, 6000.0] | 3 | 1 | 0 |
| (6000.0, 7000.0] | 0 | 3 | 0 |
| (7000.0, 8000.0] | 0 | 2 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=19.509733775665147 < 23.684791304840576
True
We fail to reject the hypothesis where there household income is independent from whether respondents used public wifi at alpha value being set to 0.05.
income_vs_used_public_wifi = relation.interval_vs_distinct(
normalized_income,
normalized_used_public_wifi,
summary_income.index
)
relation.independence_check(income_vs_used_public_wifi, 0.05)
| Tidak | Tidak pasti/ tidak tahu | Ya | |
|---|---|---|---|
| Household income | |||
| (-8.001, 1000.0] | 4 | 1 | 3 |
| (1000.0, 2000.0] | 14 | 0 | 13 |
| (2000.0, 3000.0] | 12 | 2 | 19 |
| (3000.0, 4000.0] | 10 | 0 | 15 |
| (4000.0, 5000.0] | 7 | 0 | 1 |
| (5000.0, 6000.0] | 2 | 1 | 1 |
| (6000.0, 7000.0] | 3 | 0 | 0 |
| (7000.0, 8000.0] | 2 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=22.836703334388524 < 23.684791304840576
True
We fail to reject the hypothesis where there household income is independent from whether respondents used public wifi provided by the government at alpha value being set to 0.05.
income_vs_used_selangor_wifi = relation.interval_vs_distinct(
normalized_income,
normalized_used_selangor_wifi,
summary_income.index
)
relation.independence_check(income_vs_used_selangor_wifi, 0.05)
| Tidak | Ya | Tidak pasti/ tidak tahu | |
|---|---|---|---|
| Household income | |||
| (-8.001, 1000.0] | 6 | 1 | 1 |
| (1000.0, 2000.0] | 15 | 10 | 2 |
| (2000.0, 3000.0] | 22 | 10 | 1 |
| (3000.0, 4000.0] | 14 | 11 | 0 |
| (4000.0, 5000.0] | 5 | 2 | 1 |
| (5000.0, 6000.0] | 3 | 0 | 1 |
| (6000.0, 7000.0] | 3 | 0 | 0 |
| (7000.0, 8000.0] | 2 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=13.74350347546426 < 23.684791304840576
True
We fail to reject the hypothesis where there household income is independent from whether respondents could work from home provided by the government at alpha value being set to 0.05.
income_vs_wfh = relation.interval_vs_distinct(
normalized_income,
normalized_wfh,
summary_income.index
)
relation.independence_check(income_vs_wfh, 0.05)
| Tidak | Ya | Tidak pasti/ tidak tahu | |
|---|---|---|---|
| Household income | |||
| (-8.001, 1000.0] | 2 | 6 | 0 |
| (1000.0, 2000.0] | 4 | 16 | 7 |
| (2000.0, 3000.0] | 5 | 20 | 8 |
| (3000.0, 4000.0] | 6 | 17 | 2 |
| (4000.0, 5000.0] | 1 | 6 | 1 |
| (5000.0, 6000.0] | 0 | 4 | 0 |
| (6000.0, 7000.0] | 0 | 2 | 1 |
| (7000.0, 8000.0] | 0 | 2 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=10.768244887120556 < 23.684791304840576
True
We fail to reject the hypothesis where there household income is independent from whether respondents could work from home comfortably provided by the government at alpha value being set to 0.05.
income_vs_comfortable_wfh = relation.interval_vs_distinct(
normalized_income,
normalized_comfortable_wfh,
summary_income.index
)
relation.independence_check(income_vs_comfortable_wfh, 0.05)
| Tidak | Ya | Tidak pasti/ tidak tahu | |
|---|---|---|---|
| Household income | |||
| (-8.001, 1000.0] | 3 | 5 | 0 |
| (1000.0, 2000.0] | 6 | 17 | 4 |
| (2000.0, 3000.0] | 8 | 16 | 9 |
| (3000.0, 4000.0] | 6 | 16 | 3 |
| (4000.0, 5000.0] | 1 | 5 | 2 |
| (5000.0, 6000.0] | 4 | 0 | 0 |
| (6000.0, 7000.0] | 2 | 1 | 0 |
| (7000.0, 8000.0] | 1 | 1 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=20.263573609451747 < 23.684791304840576
True
income_vs_can_elearn = relation.interval_vs_distinct(
normalized_income,
normalized_can_elearn,
summary_income.index
)
relation.independence_check(income_vs_can_elearn, 0.05)
| Ya | Tidak | Tidak pasti/ tidak tahu | |
|---|---|---|---|
| Household income | |||
| (-8.001, 1000.0] | 5 | 2 | 1 |
| (1000.0, 2000.0] | 17 | 6 | 4 |
| (2000.0, 3000.0] | 20 | 9 | 4 |
| (3000.0, 4000.0] | 17 | 7 | 1 |
| (4000.0, 5000.0] | 6 | 1 | 1 |
| (5000.0, 6000.0] | 4 | 0 | 0 |
| (6000.0, 7000.0] | 1 | 0 | 2 |
| (7000.0, 8000.0] | 2 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=14.751114988920545 < 23.684791304840576
True
income_vs_comfortable_elearn = relation.interval_vs_distinct(
normalized_income,
normalized_comfortable_elearn,
summary_income.index
)
relation.independence_check(income_vs_comfortable_elearn, 0.05)
| Tidak | Ya | Tidak pasti/ tidak tahu | |
|---|---|---|---|
| Household income | |||
| (-8.001, 1000.0] | 3 | 4 | 1 |
| (1000.0, 2000.0] | 9 | 12 | 6 |
| (2000.0, 3000.0] | 9 | 15 | 9 |
| (3000.0, 4000.0] | 10 | 12 | 3 |
| (4000.0, 5000.0] | 1 | 5 | 2 |
| (5000.0, 6000.0] | 4 | 0 | 0 |
| (6000.0, 7000.0] | 0 | 1 | 2 |
| (7000.0, 8000.0] | 1 | 1 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=16.919992557775167 < 23.684791304840576
True
income_vs_budget_internet = relation.interval_vs_interval(
normalized_income,
normalized_budget_internet,
summary_income.index,
summary_budget_internet.index,
)
relation.independence_check(income_vs_budget_internet, 0.05)
relation.correlation_check(income_vs_budget_internet, alpha=0.05, method="spearman")
| budget internet | (-0.001, 50.0] | (50.0, 100.0] | (100.0, 150.0] | (150.0, 200.0] | (200.0, 250.0] | (250.0, 300.0] | (300.0, 350.0] | (350.0, 400.0] | (400.0, 450.0] | (450.0, 500.0] |
|---|---|---|---|---|---|---|---|---|---|---|
| Household income | ||||||||||
| (-8.001, 1000.0] | 5 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| (1000.0, 2000.0] | 21 | 5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| (2000.0, 3000.0] | 20 | 10 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| (3000.0, 4000.0] | 13 | 10 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
| (4000.0, 5000.0] | 5 | 2 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| (5000.0, 6000.0] | 0 | 3 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| (6000.0, 7000.0] | 0 | 0 | 1 | 2 | 0 | 0 | 0 | 0 | 0 | 0 |
| (7000.0, 8000.0] | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
H_0 is rejected at alpha=0.05 since test statistic chi2=64.99069264548768 >= 41.33713815142739 The negative correlation is high at rs=-0.7856457858243782. Failed to reject H_0 at alpha=0.05 since test statistic T=-2.1994988691951067 and critical region=±3.182446305284263. Hence, for budget internet at (-0.001, 50.0], the correlation IS NOT significant. The negative correlation is some at rs=-0.45420146992971866. Failed to reject H_0 at alpha=0.05 since test statistic T=-0.8830406415531037 and critical region=±3.182446305284263. Hence, for budget internet at (50.0, 100.0], the correlation IS NOT significant. The correlation is very low at rs=0.06234796863885497. Failed to reject H_0 at alpha=0.05 since test statistic T=0.10820035616009188 and critical region=±3.182446305284263. Hence, for budget internet at (100.0, 150.0], the correlation IS NOT significant. The correlation is some at rs=0.495558504409436. Failed to reject H_0 at alpha=0.05 since test statistic T=0.9882082044615871 and critical region=±3.182446305284263. Hence, for budget internet at (150.0, 200.0], the correlation IS NOT significant. The negative correlation is very low at rs=-0.08247860988423225. Failed to reject H_0 at alpha=0.05 since test statistic T=-0.14334554477024897 and critical region=±3.182446305284263. Hence, for budget internet at (450.0, 500.0], the correlation IS NOT significant.
| Correlation | |
|---|---|
| budget internet | |
| (-0.001, 50.0] | -0.785646 |
| (50.0, 100.0] | -0.454201 |
| (100.0, 150.0] | 0.062348 |
| (150.0, 200.0] | 0.495559 |
| (450.0, 500.0] | -0.082479 |
income_vs_budget_computer = relation.interval_vs_interval(
normalized_income,
normalized_budget_computer,
summary_income.index,
summary_budget_computer.index,
)
relation.independence_check(income_vs_budget_computer, 0.05)
| budget computer | (-0.001, 100.0] | (100.0, 200.0] | (200.0, 300.0] | (300.0, 400.0] | (400.0, 500.0] | (500.0, 600.0] | (600.0, 700.0] | (700.0, 800.0] |
|---|---|---|---|---|---|---|---|---|
| Household income | ||||||||
| (-8.001, 1000.0] | 2 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
| (1000.0, 2000.0] | 5 | 2 | 2 | 0 | 5 | 0 | 0 | 1 |
| (2000.0, 3000.0] | 4 | 3 | 2 | 0 | 1 | 0 | 3 | 0 |
| (3000.0, 4000.0] | 2 | 1 | 3 | 0 | 4 | 0 | 2 | 0 |
| (4000.0, 5000.0] | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
| (5000.0, 6000.0] | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| (6000.0, 7000.0] | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| (7000.0, 8000.0] | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=32.17702297702297 < 37.65248413348277
True
income_vs_budget_mobile = relation.interval_vs_interval(
normalized_income,
normalized_budget_mobile,
summary_income.index,
summary_budget_mobile.index,
)
relation.independence_check(income_vs_budget_mobile, 0.05)
| budget mobile | (-0.001, 100.0] | (100.0, 200.0] | (200.0, 300.0] | (300.0, 400.0] | (400.0, 500.0] | (500.0, 600.0] | (600.0, 700.0] | (700.0, 800.0] |
|---|---|---|---|---|---|---|---|---|
| Household income | ||||||||
| (-8.001, 1000.0] | 3 | 0 | 0 | 0 | 0 | 1 | 1 | 0 |
| (1000.0, 2000.0] | 7 | 3 | 3 | 1 | 3 | 1 | 0 | 3 |
| (2000.0, 3000.0] | 5 | 2 | 3 | 1 | 11 | 1 | 2 | 1 |
| (3000.0, 4000.0] | 2 | 1 | 3 | 0 | 6 | 2 | 2 | 1 |
| (4000.0, 5000.0] | 1 | 1 | 0 | 0 | 2 | 0 | 0 | 0 |
| (5000.0, 6000.0] | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| (6000.0, 7000.0] | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| (7000.0, 8000.0] | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=39.14368833672451 < 58.12403768086803
True
ranked_edulevel = pd.Series(
[
"Sekolah rendah",
"Sekolah menengah",
"Institusi pengajian tinggi",
],
name=fields.FIELD_EDUCATION_LEVEL,
)
edulevel_vs_public_access_method = relation.distinct_vs_mcq(
normalized_edulevel,
normalized_public_access_method,
ranked_edulevel
)
relation.independence_check(edulevel_vs_public_access_method, 0.05)
| Pejabat jabatan kerajaan | Pusat tumpuan perkhidmatan kerajaan (spt UTC dan RTC) | Kaunter/Pejabat bergerak perkhidmatan kerajaan | Dalam talian | |
|---|---|---|---|---|
| education_level | ||||
| Sekolah rendah | 0 | 0 | 0 | 0 |
| Sekolah menengah | 10 | 11 | 4 | 29 |
| Institusi pengajian tinggi | 20 | 13 | 7 | 51 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=0.9913523976023976 < 7.814727903251179
True
edulevel_vs_ownership = relation.distinct_vs_mcq(
normalized_edulevel, normalized_owned_devices, ranked_edulevel
)
relation.independence_check(edulevel_vs_ownership, 0.05) or relation.correlation_check(
edulevel_vs_ownership, alpha=0.05, method="spearman"
)
| Komputer desktop | Laptop(termasuk kompter riba dan netbook) | Tablet (iPad, galaxy tab, dll) | Konsol permainan (Playstation, Nintendo Switch, Xbox) | Telefon pintar | smart tv | Android box | |
|---|---|---|---|---|---|---|---|
| education_level | |||||||
| Sekolah rendah | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Sekolah menengah | 4 | 9 | 5 | 4 | 46 | 1 | 1 |
| Institusi pengajian tinggi | 15 | 37 | 17 | 4 | 60 | 0 | 0 |
H_0 is rejected at alpha=0.05 since test statistic chi2=15.773935788362264 >= 12.591587243743977 The negative correlation is very high at rs=-0.9999999999999999. H_0 is rejected at alpha=0.05 since test statistic T=-134217727.99999999, and critical region=±2.7764451051977987. Hence, for None at Komputer desktop, the correlation IS significant. The negative correlation is very high at rs=-0.9999999999999999. H_0 is rejected at alpha=0.05 since test statistic T=-134217727.99999999, and critical region=±2.7764451051977987. Hence, for None at Laptop(termasuk kompter riba dan netbook), the correlation IS significant. The negative correlation is very high at rs=-0.9999999999999999. H_0 is rejected at alpha=0.05 since test statistic T=-134217727.99999999, and critical region=±2.7764451051977987. Hence, for None at Tablet (iPad, galaxy tab, dll), the correlation IS significant. The negative correlation is very high at rs=-0.9999999999999999. H_0 is rejected at alpha=0.05 since test statistic T=-134217727.99999999, and critical region=±2.7764451051977987. Hence, for None at Telefon pintar, the correlation IS significant. The correlation is very high at rs=0.9999999999999999. H_0 is rejected at alpha=0.05 since test statistic T=134217727.99999999, and critical region=±2.7764451051977987. Hence, for None at smart tv, the correlation IS significant. The correlation is very high at rs=0.9999999999999999. H_0 is rejected at alpha=0.05 since test statistic T=134217727.99999999, and critical region=±2.7764451051977987. Hence, for None at Android box, the correlation IS significant.
| Correlation | |
|---|---|
| Komputer desktop | -1.0 |
| Laptop(termasuk kompter riba dan netbook) | -1.0 |
| Tablet (iPad, galaxy tab, dll) | -1.0 |
| Telefon pintar | -1.0 |
| smart tv | 1.0 |
| Android box | 1.0 |
edulevel_vs_sufficient_usage = relation.distinct_vs_distinct(
normalized_edulevel, normalized_sufficient_usage, ranked_edulevel
)
relation.independence_check(edulevel_vs_sufficient_usage, 0.05)
| sufficient_usage | Tidak | Ya | Tidak pasti/ tidak tahu |
|---|---|---|---|
| education_level | |||
| Sekolah rendah | 0 | 0 | 0 |
| Sekolah menengah | 12 | 30 | 5 |
| Institusi pengajian tinggi | 20 | 37 | 4 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=1.045203004857124 < 5.991464547107979
True
edulevel_vs_used_public_wifi = relation.distinct_vs_distinct(
normalized_edulevel, normalized_used_public_wifi, ranked_edulevel
)
relation.independence_check(
edulevel_vs_used_public_wifi, 0.05
) or relation.correlation_check(
edulevel_vs_used_public_wifi, alpha=0.05, method="spearman"
)
| used_public_wifi | Tidak | Tidak pasti/ tidak tahu | Ya |
|---|---|---|---|
| education_level | |||
| Sekolah rendah | 0 | 0 | 0 |
| Sekolah menengah | 27 | 1 | 19 |
| Institusi pengajian tinggi | 27 | 2 | 32 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=1.8635589568928366 < 5.991464547107979
True
edulevel_vs_used_selangor_wifi = relation.distinct_vs_distinct(
normalized_edulevel, normalized_used_selangor_wifi, ranked_edulevel
)
relation.independence_check(
edulevel_vs_used_selangor_wifi, 0.05
) or relation.correlation_check(
edulevel_vs_used_selangor_wifi, alpha=0.05, method="spearman"
)
| used_selangor_wifi | Tidak | Ya | Tidak pasti/ tidak tahu |
|---|---|---|---|
| education_level | |||
| Sekolah rendah | 0 | 0 | 0 |
| Sekolah menengah | 36 | 9 | 2 |
| Institusi pengajian tinggi | 33 | 25 | 3 |
H_0 is rejected at alpha=0.05 since test statistic chi2=6.14834758701406 >= 5.991464547107979 The correlation is very high at rs=0.9999999999999999. H_0 is rejected at alpha=0.05 since test statistic T=67108863.99999999, and critical region=±12.706204736432095. Hence, for used_selangor_wifi at Tidak, the correlation IS significant. The negative correlation is very high at rs=-0.9999999999999999. H_0 is rejected at alpha=0.05 since test statistic T=-67108863.99999999, and critical region=±12.706204736432095. Hence, for used_selangor_wifi at Ya, the correlation IS significant. The negative correlation is very high at rs=-0.9999999999999999. H_0 is rejected at alpha=0.05 since test statistic T=-67108863.99999999, and critical region=±12.706204736432095. Hence, for used_selangor_wifi at Tidak pasti/ tidak tahu, the correlation IS significant.
| Correlation | |
|---|---|
| used_selangor_wifi | |
| Tidak | 1.0 |
| Ya | -1.0 |
| Tidak pasti/ tidak tahu | -1.0 |
edulevel_vs_wfh = relation.distinct_vs_distinct(
normalized_edulevel,
normalized_wfh,
ranked_edulevel
)
relation.independence_check(edulevel_vs_wfh, 0.05)
| can_work_from_home | Tidak | Ya | Tidak pasti/ tidak tahu |
|---|---|---|---|
| education_level | |||
| Sekolah rendah | 0 | 0 | 0 |
| Sekolah menengah | 9 | 28 | 10 |
| Institusi pengajian tinggi | 8 | 45 | 8 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=2.466583116611911 < 5.991464547107979
True
edulevel_vs_comfortable_wfh = relation.distinct_vs_distinct(
normalized_edulevel,
normalized_comfortable_wfh,
ranked_edulevel
)
relation.independence_check(edulevel_vs_comfortable_wfh, 0.05)
| comfy_work_from_home | Tidak | Ya | Tidak pasti/ tidak tahu |
|---|---|---|---|
| education_level | |||
| Sekolah rendah | 0 | 0 | 0 |
| Sekolah menengah | 14 | 25 | 8 |
| Institusi pengajian tinggi | 16 | 36 | 9 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=0.3671175908880996 < 5.991464547107979
True
edulevel_vs_can_elearn = relation.distinct_vs_distinct(
normalized_edulevel,
normalized_can_elearn,
ranked_edulevel
)
relation.independence_check(edulevel_vs_can_elearn, 0.05)
| family_can_elearn | Ya | Tidak | Tidak pasti/ tidak tahu |
|---|---|---|---|
| education_level | |||
| Sekolah rendah | 0 | 0 | 0 |
| Sekolah menengah | 35 | 8 | 4 |
| Institusi pengajian tinggi | 37 | 16 | 8 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=2.279037321241716 < 5.991464547107979
True
edulevel_vs_comfortable_elearn = relation.distinct_vs_distinct(
normalized_edulevel, normalized_comfortable_elearn, ranked_edulevel
)
relation.independence_check(
edulevel_vs_comfortable_elearn, 0.05
) or relation.correlation_check(
edulevel_vs_comfortable_elearn, alpha=0.05, method="spearman"
)
| comfy_elearn | Tidak | Ya | Tidak pasti/ tidak tahu |
|---|---|---|---|
| education_level | |||
| Sekolah rendah | 0 | 0 | 0 |
| Sekolah menengah | 13 | 25 | 9 |
| Institusi pengajian tinggi | 23 | 25 | 13 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=1.719123569141009 < 5.991464547107979
True
edulevel_vs_budget_internet = relation.distinct_vs_interval(
normalized_edulevel,
normalized_budget_internet,
ranked_edulevel,
summary_budget_internet.index,
)
relation.independence_check(
edulevel_vs_budget_internet, 0.05
) or relation.correlation_check(
edulevel_vs_budget_internet, alpha=0.05, method="spearman"
)
| budget internet | (-0.001, 50.0] | (50.0, 100.0] | (100.0, 150.0] | (150.0, 200.0] | (200.0, 250.0] | (250.0, 300.0] | (300.0, 350.0] | (350.0, 400.0] | (400.0, 450.0] | (450.0, 500.0] |
|---|---|---|---|---|---|---|---|---|---|---|
| education_level | ||||||||||
| Sekolah rendah | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Sekolah menengah | 29 | 13 | 1 | 2 | 0 | 0 | 0 | 0 | 0 | 0 |
| Institusi pengajian tinggi | 34 | 21 | 2 | 3 | 0 | 0 | 0 | 0 | 0 | 1 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=1.4299982822515775 < 9.487729036781154
True
edulevel_vs_budget_computer = relation.distinct_vs_interval(
normalized_edulevel,
normalized_budget_computer,
ranked_edulevel,
summary_budget_computer.index,
)
relation.independence_check(
edulevel_vs_budget_computer, 0.05
) or relation.correlation_check(edulevel_vs_budget_computer, 0.05, method="spearman")
| budget computer | (-0.001, 100.0] | (100.0, 200.0] | (200.0, 300.0] | (300.0, 400.0] | (400.0, 500.0] | (500.0, 600.0] | (600.0, 700.0] | (700.0, 800.0] |
|---|---|---|---|---|---|---|---|---|
| education_level | ||||||||
| Sekolah rendah | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Sekolah menengah | 9 | 5 | 3 | 0 | 2 | 0 | 3 | 1 |
| Institusi pengajian tinggi | 5 | 2 | 4 | 0 | 9 | 0 | 3 | 2 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=7.288627893845285 < 11.070497693516351
True
edulevel_vs_budget_mobile = relation.distinct_vs_interval(
normalized_edulevel,
normalized_budget_mobile,
ranked_edulevel,
summary_budget_mobile.index,
)
relation.independence_check(
edulevel_vs_budget_mobile, 0.05
) or relation.correlation_check(edulevel_vs_budget_mobile, 0.05, method="spearman")
| budget mobile | (-0.001, 100.0] | (100.0, 200.0] | (200.0, 300.0] | (300.0, 400.0] | (400.0, 500.0] | (500.0, 600.0] | (600.0, 700.0] | (700.0, 800.0] |
|---|---|---|---|---|---|---|---|---|
| education_level | ||||||||
| Sekolah rendah | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Sekolah menengah | 12 | 4 | 3 | 1 | 10 | 1 | 1 | 2 |
| Institusi pengajian tinggi | 6 | 3 | 6 | 1 | 13 | 4 | 4 | 5 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=7.662675504984604 < 14.067140449340169
True
age_vs_public_access_method = relation.interval_vs_mcq(
normalized_age, normalized_public_access_method, summary_age.index
)
relation.independence_check(
age_vs_public_access_method, 0.05
) or relation.correlation_check(age_vs_public_access_method, 0.05, method="spearman")
| Pejabat jabatan kerajaan | Pusat tumpuan perkhidmatan kerajaan (spt UTC dan RTC) | Kaunter/Pejabat bergerak perkhidmatan kerajaan | Dalam talian | |
|---|---|---|---|---|
| Age | ||||
| (-0.001, 10.0] | 1 | 0 | 0 | 0 |
| (10.0, 20.0] | 2 | 0 | 0 | 3 |
| (20.0, 30.0] | 4 | 2 | 3 | 19 |
| (30.0, 40.0] | 17 | 15 | 6 | 43 |
| (40.0, 50.0] | 5 | 7 | 2 | 14 |
| (50.0, 60.0] | 3 | 0 | 0 | 1 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=17.737781986531985 < 24.995790139728616
True
age_vs_ownership = relation.interval_vs_mcq(
normalized_age, normalized_owned_devices, summary_age.index
)
relation.independence_check(age_vs_ownership, 0.05) or relation.correlation_check(
age_vs_ownership, alpha=0.05, method="spearman"
)
| Komputer desktop | Laptop(termasuk kompter riba dan netbook) | Tablet (iPad, galaxy tab, dll) | Konsol permainan (Playstation, Nintendo Switch, Xbox) | Telefon pintar | smart tv | Android box | |
|---|---|---|---|---|---|---|---|
| Age | |||||||
| (-0.001, 10.0] | 0 | 1 | 0 | 0 | 1 | 0 | 0 |
| (10.0, 20.0] | 0 | 3 | 1 | 0 | 5 | 0 | 0 |
| (20.0, 30.0] | 4 | 11 | 4 | 3 | 23 | 0 | 0 |
| (30.0, 40.0] | 10 | 26 | 13 | 2 | 52 | 0 | 0 |
| (40.0, 50.0] | 4 | 6 | 5 | 3 | 23 | 1 | 1 |
| (50.0, 60.0] | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=17.345951085437612 < 43.77297182574219
True
age_vs_sufficient_usage = relation.distinct_vs_distinct(
normalized_edulevel, normalized_sufficient_usage, ranked_edulevel
)
relation.independence_check(
age_vs_sufficient_usage, 0.05
) or relation.correlation_check(age_vs_sufficient_usage, 0.05, method="spearman")
| sufficient_usage | Tidak | Ya | Tidak pasti/ tidak tahu |
|---|---|---|---|
| education_level | |||
| Sekolah rendah | 0 | 0 | 0 |
| Sekolah menengah | 12 | 30 | 5 |
| Institusi pengajian tinggi | 20 | 37 | 4 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=1.045203004857124 < 5.991464547107979
True
age_vs_used_public_wifi = relation.interval_vs_distinct(
normalized_age, normalized_used_public_wifi, summary_age.index
)
relation.independence_check(
age_vs_used_public_wifi, 0.05
) or relation.correlation_check(
age_vs_used_public_wifi, alpha=0.05, method="spearman"
)
| Tidak | Tidak pasti/ tidak tahu | Ya | |
|---|---|---|---|
| Age | |||
| (-0.001, 10.0] | 0 | 1 | 0 |
| (10.0, 20.0] | 2 | 0 | 3 |
| (20.0, 30.0] | 12 | 0 | 12 |
| (30.0, 40.0] | 23 | 2 | 28 |
| (40.0, 50.0] | 14 | 1 | 8 |
| (50.0, 60.0] | 3 | 0 | 1 |
H_0 is rejected at alpha=0.05 since test statistic chi2=31.10420391521704 >= 18.307038053275146 The correlation is high at rs=0.6. Failed to reject H_0 at alpha=0.05 since test statistic T=0.75 and critical region=±12.706204736432095. Hence, for None at Tidak, the correlation IS NOT significant. The negative correlation is very low at rs=-0.030860669992418384. Failed to reject H_0 at alpha=0.05 since test statistic T=-0.030875376054721928 and critical region=±12.706204736432095. Hence, for None at Tidak pasti/ tidak tahu, the correlation IS NOT significant. The correlation is low at rs=0.2571428571428572. Failed to reject H_0 at alpha=0.05 since test statistic T=0.2660905781950872 and critical region=±12.706204736432095. Hence, for None at Ya, the correlation IS NOT significant.
| Correlation | |
|---|---|
| Tidak | 0.600000 |
| Tidak pasti/ tidak tahu | -0.030861 |
| Ya | 0.257143 |
age_vs_used_selangor_wifi = relation.interval_vs_distinct(
normalized_age, normalized_used_selangor_wifi, summary_age.index
)
relation.independence_check(
age_vs_used_selangor_wifi, 0.05
) or relation.correlation_check(
age_vs_used_selangor_wifi, alpha=0.05, method="spearman"
)
| Tidak | Ya | Tidak pasti/ tidak tahu | |
|---|---|---|---|
| Age | |||
| (-0.001, 10.0] | 0 | 0 | 1 |
| (10.0, 20.0] | 2 | 3 | 0 |
| (20.0, 30.0] | 14 | 8 | 2 |
| (30.0, 40.0] | 34 | 17 | 2 |
| (40.0, 50.0] | 16 | 6 | 1 |
| (50.0, 60.0] | 4 | 0 | 0 |
H_0 is rejected at alpha=0.05 since test statistic chi2=22.86787290251074 >= 18.307038053275146 The correlation is high at rs=0.6. Failed to reject H_0 at alpha=0.05 since test statistic T=0.75 and critical region=±12.706204736432095. Hence, for None at Tidak, the correlation IS NOT significant. The correlation is very low at rs=0.11595420713048969. Failed to reject H_0 at alpha=0.05 since test statistic T=0.1167416810835558 and critical region=±12.706204736432095. Hence, for None at Ya, the correlation IS NOT significant. The negative correlation is very low at rs=-0.11952286093343938. Failed to reject H_0 at alpha=0.05 since test statistic T=-0.12038585308576918 and critical region=±12.706204736432095. Hence, for None at Tidak pasti/ tidak tahu, the correlation IS NOT significant.
| Correlation | |
|---|---|
| Tidak | 0.600000 |
| Ya | 0.115954 |
| Tidak pasti/ tidak tahu | -0.119523 |
age_vs_wfh = relation.interval_vs_distinct(
normalized_age, normalized_wfh, summary_age.index
)
relation.independence_check(age_vs_wfh, 0.05) or relation.correlation_check(
age_vs_wfh, 0.05, method="spearman"
)
| Tidak | Ya | Tidak pasti/ tidak tahu | |
|---|---|---|---|
| Age | |||
| (-0.001, 10.0] | 1 | 0 | 0 |
| (10.0, 20.0] | 0 | 2 | 3 |
| (20.0, 30.0] | 0 | 21 | 3 |
| (30.0, 40.0] | 11 | 34 | 8 |
| (40.0, 50.0] | 4 | 14 | 5 |
| (50.0, 60.0] | 2 | 2 | 0 |
H_0 is rejected at alpha=0.05 since test statistic chi2=22.409321369433226 >= 18.307038053275146 The correlation is some at rs=0.5797710356524484. Failed to reject H_0 at alpha=0.05 since test statistic T=0.7115680669648199 and critical region=±12.706204736432095. Hence, for None at Tidak, the correlation IS NOT significant. The correlation is low at rs=0.3768511731740915. Failed to reject H_0 at alpha=0.05 since test statistic T=0.4068464035508638 and critical region=±12.706204736432095. Hence, for None at Ya, the correlation IS NOT significant. The correlation is low at rs=0.20597146021777488. Failed to reject H_0 at alpha=0.05 since test statistic T=0.21048467276349228 and critical region=±12.706204736432095. Hence, for None at Tidak pasti/ tidak tahu, the correlation IS NOT significant.
| Correlation | |
|---|---|
| Tidak | 0.579771 |
| Ya | 0.376851 |
| Tidak pasti/ tidak tahu | 0.205971 |
age_vs_comfortable_wfh = relation.interval_vs_distinct(
normalized_age, normalized_comfortable_wfh, summary_age.index
)
relation.independence_check(age_vs_comfortable_wfh, 0.05) or relation.correlation_check(
age_vs_comfortable_wfh, 0.05, method="spearman"
)
| Tidak | Ya | Tidak pasti/ tidak tahu | |
|---|---|---|---|
| Age | |||
| (-0.001, 10.0] | 1 | 0 | 0 |
| (10.0, 20.0] | 1 | 2 | 2 |
| (20.0, 30.0] | 4 | 16 | 4 |
| (30.0, 40.0] | 15 | 28 | 10 |
| (40.0, 50.0] | 7 | 14 | 2 |
| (50.0, 60.0] | 3 | 1 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=11.957605682644932 < 18.307038053275146
True
age_vs_can_elearn = relation.interval_vs_distinct(
normalized_age, normalized_can_elearn, summary_age.index
)
relation.independence_check(age_vs_can_elearn, 0.05) or relation.correlation_check(
age_vs_can_elearn, 0.05
)
| Ya | Tidak | Tidak pasti/ tidak tahu | |
|---|---|---|---|
| Age | |||
| (-0.001, 10.0] | 0 | 1 | 0 |
| (10.0, 20.0] | 2 | 1 | 2 |
| (20.0, 30.0] | 15 | 4 | 5 |
| (30.0, 40.0] | 34 | 15 | 4 |
| (40.0, 50.0] | 18 | 3 | 2 |
| (50.0, 60.0] | 3 | 1 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=13.150878864208439 < 18.307038053275146
True
age_vs_comfortable_elearn = relation.interval_vs_distinct(
normalized_age, normalized_comfortable_elearn, summary_age.index
)
relation.independence_check(
age_vs_comfortable_elearn, 0.05
) or relation.correlation_check(
age_vs_comfortable_elearn, alpha=0.05, method="spearman"
)
| Tidak | Ya | Tidak pasti/ tidak tahu | |
|---|---|---|---|
| Age | |||
| (-0.001, 10.0] | 1 | 0 | 0 |
| (10.0, 20.0] | 1 | 1 | 3 |
| (20.0, 30.0] | 6 | 11 | 7 |
| (30.0, 40.0] | 20 | 25 | 8 |
| (40.0, 50.0] | 7 | 11 | 5 |
| (50.0, 60.0] | 2 | 2 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=10.367134550643662 < 18.307038053275146
True
age_vs_budget_internet = relation.interval_vs_interval(
normalized_age,
normalized_budget_internet,
summary_age.index,
summary_budget_internet.index,
)
relation.independence_check(
age_vs_budget_internet, 0.05
) or relation.correlation_check(
age_vs_budget_internet, alpha=0.05, method="spearman"
)
| budget internet | (-0.001, 50.0] | (50.0, 100.0] | (100.0, 150.0] | (150.0, 200.0] | (200.0, 250.0] | (250.0, 300.0] | (300.0, 350.0] | (350.0, 400.0] | (400.0, 450.0] | (450.0, 500.0] |
|---|---|---|---|---|---|---|---|---|---|---|
| Age | ||||||||||
| (-0.001, 10.0] | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| (10.0, 20.0] | 4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| (20.0, 30.0] | 13 | 8 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| (30.0, 40.0] | 30 | 16 | 2 | 3 | 0 | 0 | 0 | 0 | 0 | 1 |
| (40.0, 50.0] | 14 | 8 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| (50.0, 60.0] | 3 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=3.9201242192110963 < 26.29622760486423
True
age_vs_budget_computer = relation.interval_vs_interval(
normalized_age,
normalized_budget_computer,
summary_age.index,
summary_budget_computer.index,
)
relation.independence_check(age_vs_budget_computer, 0.05) or relation.correlation_check(
age_vs_budget_computer, 0.05, method="spearman"
)
| budget computer | (-0.001, 100.0] | (100.0, 200.0] | (200.0, 300.0] | (300.0, 400.0] | (400.0, 500.0] | (500.0, 600.0] | (600.0, 700.0] | (700.0, 800.0] |
|---|---|---|---|---|---|---|---|---|
| Age | ||||||||
| (-0.001, 10.0] | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| (10.0, 20.0] | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| (20.0, 30.0] | 3 | 0 | 0 | 0 | 3 | 0 | 0 | 0 |
| (30.0, 40.0] | 6 | 2 | 5 | 0 | 6 | 0 | 5 | 3 |
| (40.0, 50.0] | 3 | 5 | 2 | 0 | 1 | 0 | 0 | 0 |
| (50.0, 60.0] | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=24.15619397437579 < 31.410432844230918
True
age_vs_budget_mobile = relation.interval_vs_interval(
normalized_age,
normalized_budget_mobile,
summary_age.index,
summary_budget_mobile.index,
)
relation.independence_check(
age_vs_budget_mobile, 0.05
) or relation.correlation_check(age_vs_budget_mobile, 0.05, method="spearman")
| budget mobile | (-0.001, 100.0] | (100.0, 200.0] | (200.0, 300.0] | (300.0, 400.0] | (400.0, 500.0] | (500.0, 600.0] | (600.0, 700.0] | (700.0, 800.0] |
|---|---|---|---|---|---|---|---|---|
| Age | ||||||||
| (-0.001, 10.0] | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| (10.0, 20.0] | 1 | 0 | 0 | 0 | 2 | 0 | 1 | 1 |
| (20.0, 30.0] | 4 | 1 | 0 | 1 | 5 | 1 | 0 | 0 |
| (30.0, 40.0] | 6 | 2 | 8 | 0 | 12 | 3 | 3 | 4 |
| (40.0, 50.0] | 5 | 4 | 1 | 1 | 3 | 0 | 1 | 2 |
| (50.0, 60.0] | 2 | 0 | 0 | 0 | 1 | 1 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=27.4154543363239 < 41.33713815142739
True
ranked_gender = pd.Series(['Lelaki', 'Perempuan', 'Transgender'], name=fields.FIELD_GENDER)
gender_vs_public_access_method = relation.distinct_vs_mcq(
normalized_gender,
normalized_public_access_method,
ranked_gender
)
relation.independence_check(gender_vs_public_access_method, 0.05)
| Pejabat jabatan kerajaan | Pusat tumpuan perkhidmatan kerajaan (spt UTC dan RTC) | Kaunter/Pejabat bergerak perkhidmatan kerajaan | Dalam talian | |
|---|---|---|---|---|
| gender | ||||
| Lelaki | 14 | 6 | 2 | 19 |
| Perempuan | 12 | 13 | 5 | 37 |
| Transgender | 0 | 0 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=3.763054832623549 < 7.814727903251179
True
gender_vs_ownership = relation.distinct_vs_mcq(
normalized_gender, normalized_owned_devices, ranked_gender
)
relation.independence_check(gender_vs_ownership, 0.05)
| Komputer desktop | Laptop(termasuk kompter riba dan netbook) | Tablet (iPad, galaxy tab, dll) | Konsol permainan (Playstation, Nintendo Switch, Xbox) | Telefon pintar | smart tv | Android box | |
|---|---|---|---|---|---|---|---|
| gender | |||||||
| Lelaki | 9 | 14 | 7 | 3 | 27 | 0 | 0 |
| Perempuan | 7 | 23 | 11 | 3 | 52 | 0 | 0 |
| Transgender | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=3.0966906978180715 < 9.487729036781154
True
gender_vs_sufficient_usage = relation.distinct_vs_distinct(
normalized_gender, normalized_sufficient_usage, ranked_gender
)
relation.independence_check(gender_vs_sufficient_usage, 0.05)
| sufficient_usage | Tidak | Ya | Tidak pasti/ tidak tahu |
|---|---|---|---|
| gender | |||
| Lelaki | 10 | 17 | 2 |
| Perempuan | 10 | 37 | 5 |
| Transgender | 0 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=2.351885183781736 < 5.991464547107979
True
gender_vs_used_public_wifi = relation.distinct_vs_distinct(
normalized_gender, normalized_used_public_wifi, ranked_gender
)
relation.independence_check(gender_vs_used_public_wifi, 0.05)
| used_public_wifi | Tidak | Tidak pasti/ tidak tahu | Ya |
|---|---|---|---|
| gender | |||
| Lelaki | 15 | 1 | 13 |
| Perempuan | 26 | 1 | 25 |
| Transgender | 0 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=0.22823077944586498 < 5.991464547107979
True
gender_vs_used_selangor_wifi = relation.distinct_vs_distinct(
normalized_gender, normalized_used_selangor_wifi, ranked_gender
)
relation.independence_check(
gender_vs_used_selangor_wifi, 0.05
)
| used_selangor_wifi | Tidak | Ya | Tidak pasti/ tidak tahu |
|---|---|---|---|
| gender | |||
| Lelaki | 18 | 8 | 3 |
| Perempuan | 32 | 17 | 3 |
| Transgender | 0 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=0.6843103448275859 < 5.991464547107979
True
gender_vs_wfh = relation.distinct_vs_distinct(
normalized_gender,
normalized_wfh,
ranked_gender
)
relation.independence_check(gender_vs_wfh, 0.05)
| can_work_from_home | Tidak | Ya | Tidak pasti/ tidak tahu |
|---|---|---|---|
| gender | |||
| Lelaki | 5 | 16 | 8 |
| Perempuan | 6 | 38 | 8 |
| Transgender | 0 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=2.7442729684108995 < 5.991464547107979
True
gender_vs_comfortable_wfh = relation.distinct_vs_distinct(
normalized_gender,
normalized_comfortable_wfh,
ranked_gender
)
relation.independence_check(gender_vs_comfortable_wfh, 0.05)
| comfy_work_from_home | Tidak | Ya | Tidak pasti/ tidak tahu |
|---|---|---|---|
| gender | |||
| Lelaki | 8 | 14 | 7 |
| Perempuan | 12 | 31 | 9 |
| Transgender | 0 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=1.0239141246684351 < 5.991464547107979
True
gender_vs_can_elearn = relation.distinct_vs_distinct(
normalized_gender,
normalized_can_elearn,
ranked_gender
)
relation.independence_check(gender_vs_can_elearn, 0.05)
| family_can_elearn | Ya | Tidak | Tidak pasti/ tidak tahu |
|---|---|---|---|
| gender | |||
| Lelaki | 17 | 8 | 4 |
| Perempuan | 37 | 8 | 7 |
| Transgender | 0 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=1.8433506149023393 < 5.991464547107979
True
gender_vs_budget_internet = relation.distinct_vs_interval(
normalized_gender,
normalized_budget_internet,
ranked_gender,
summary_budget_internet.index,
)
relation.independence_check(gender_vs_budget_internet, 0.05)
| budget internet | (-0.001, 50.0] | (50.0, 100.0] | (100.0, 150.0] | (150.0, 200.0] | (200.0, 250.0] | (250.0, 300.0] | (300.0, 350.0] | (350.0, 400.0] | (400.0, 450.0] | (450.0, 500.0] |
|---|---|---|---|---|---|---|---|---|---|---|
| gender | ||||||||||
| Lelaki | 16 | 8 | 1 | 2 | 0 | 0 | 0 | 0 | 0 | 1 |
| Perempuan | 33 | 15 | 1 | 3 | 0 | 0 | 0 | 0 | 0 | 0 |
| Transgender | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=2.2290043585518298 < 9.487729036781154
True
gender_vs_budget_internet = relation.distinct_vs_interval(
normalized_gender,
normalized_budget_internet,
ranked_gender,
summary_budget_internet.index,
)
relation.independence_check(gender_vs_budget_internet, 0.05)
| budget internet | (-0.001, 50.0] | (50.0, 100.0] | (100.0, 150.0] | (150.0, 200.0] | (200.0, 250.0] | (250.0, 300.0] | (300.0, 350.0] | (350.0, 400.0] | (400.0, 450.0] | (450.0, 500.0] |
|---|---|---|---|---|---|---|---|---|---|---|
| gender | ||||||||||
| Lelaki | 16 | 8 | 1 | 2 | 0 | 0 | 0 | 0 | 0 | 1 |
| Perempuan | 33 | 15 | 1 | 3 | 0 | 0 | 0 | 0 | 0 | 0 |
| Transgender | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=2.2290043585518298 < 9.487729036781154
True
gender_vs_budget_computer = relation.distinct_vs_interval(
normalized_gender,
normalized_budget_computer,
ranked_gender,
summary_budget_computer.index,
)
relation.independence_check(gender_vs_budget_computer, 0.05)
| budget computer | (-0.001, 100.0] | (100.0, 200.0] | (200.0, 300.0] | (300.0, 400.0] | (400.0, 500.0] | (500.0, 600.0] | (600.0, 700.0] | (700.0, 800.0] |
|---|---|---|---|---|---|---|---|---|
| gender | ||||||||
| Lelaki | 3 | 1 | 1 | 0 | 5 | 0 | 2 | 1 |
| Perempuan | 7 | 4 | 3 | 0 | 5 | 0 | 4 | 1 |
| Transgender | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=1.970566239316239 < 11.070497693516351
True
gender_vs_budget_mobile = relation.distinct_vs_interval(
normalized_gender,
normalized_budget_mobile,
ranked_gender,
summary_budget_mobile.index,
)
relation.independence_check(
gender_vs_budget_mobile, 0.05
)
| budget mobile | (-0.001, 100.0] | (100.0, 200.0] | (200.0, 300.0] | (300.0, 400.0] | (400.0, 500.0] | (500.0, 600.0] | (600.0, 700.0] | (700.0, 800.0] |
|---|---|---|---|---|---|---|---|---|
| gender | ||||||||
| Lelaki | 3 | 2 | 4 | 0 | 8 | 2 | 2 | 1 |
| Perempuan | 10 | 2 | 5 | 2 | 10 | 2 | 3 | 3 |
| Transgender | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=3.7301061551061556 < 14.067140449340169
True
ranked_employment = pd.Series(
[
"Bekerja dengan bergaji (sepenuh masa/ separuh masa)",
"Bekerja sendiri/ pemilik perniagaan",
"Pelajar (sepenuh masa /separuh masa)",
"Tidak bekerja kerana sakit atau kurang upaya",
"Menganggur / tidak bekerja ( tiada kerja / sedang mencari kerja)",
"Tentera / Polis / Badan Beruniform",
"Pesara / Pencen",
"Memilih tidak menjawab",
],
name=fields.FIELD_EMPLOYMENT_STATUS
)
employment_vs_public_access_method = relation.distinct_vs_mcq(
normalized_employment,
normalized_public_access_method,
ranked_employment
)
relation.independence_check(employment_vs_public_access_method, 0.05)
| Pejabat jabatan kerajaan | Pusat tumpuan perkhidmatan kerajaan (spt UTC dan RTC) | Kaunter/Pejabat bergerak perkhidmatan kerajaan | Dalam talian | |
|---|---|---|---|---|
| employment_status | ||||
| Bekerja dengan bergaji (sepenuh masa/ separuh masa) | 22 | 16 | 7 | 50 |
| Bekerja sendiri/ pemilik perniagaan | 3 | 6 | 4 | 11 |
| Pelajar (sepenuh masa /separuh masa) | 2 | 0 | 0 | 4 |
| Tidak bekerja kerana sakit atau kurang upaya | 0 | 0 | 0 | 0 |
| Menganggur / tidak bekerja ( tiada kerja / sedang mencari kerja) | 3 | 0 | 0 | 8 |
| Tentera / Polis / Badan Beruniform | 0 | 0 | 0 | 1 |
| Pesara / Pencen | 0 | 0 | 0 | 0 |
| Memilih tidak menjawab | 1 | 0 | 0 | 2 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=12.348367397502864 < 24.995790139728616
True
employment_vs_ownership = relation.distinct_vs_mcq(
normalized_employment, normalized_owned_devices, ranked_employment
)
relation.independence_check(employment_vs_ownership, 0.05)
| Komputer desktop | Laptop(termasuk kompter riba dan netbook) | Tablet (iPad, galaxy tab, dll) | Konsol permainan (Playstation, Nintendo Switch, Xbox) | Telefon pintar | smart tv | Android box | |
|---|---|---|---|---|---|---|---|
| employment_status | |||||||
| Bekerja dengan bergaji (sepenuh masa/ separuh masa) | 14 | 31 | 16 | 6 | 65 | 1 | 1 |
| Bekerja sendiri/ pemilik perniagaan | 2 | 6 | 4 | 1 | 16 | 0 | 0 |
| Pelajar (sepenuh masa /separuh masa) | 1 | 3 | 1 | 0 | 5 | 0 | 0 |
| Tidak bekerja kerana sakit atau kurang upaya | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Menganggur / tidak bekerja ( tiada kerja / sedang mencari kerja) | 1 | 4 | 1 | 0 | 11 | 0 | 0 |
| Tentera / Polis / Badan Beruniform | 0 | 1 | 1 | 1 | 1 | 0 | 0 |
| Pesara / Pencen | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Memilih tidak menjawab | 1 | 1 | 0 | 0 | 3 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=11.90457107742921 < 43.77297182574219
True
employment_vs_sufficient_usage = relation.distinct_vs_distinct(
normalized_employment, normalized_sufficient_usage, ranked_employment
)
relation.independence_check(employment_vs_sufficient_usage, 0.05)
| sufficient_usage | Tidak | Ya | Tidak pasti/ tidak tahu |
|---|---|---|---|
| employment_status | |||
| Bekerja dengan bergaji (sepenuh masa/ separuh masa) | 19 | 44 | 3 |
| Bekerja sendiri/ pemilik perniagaan | 3 | 10 | 3 |
| Pelajar (sepenuh masa /separuh masa) | 3 | 3 | 0 |
| Tidak bekerja kerana sakit atau kurang upaya | 0 | 0 | 0 |
| Menganggur / tidak bekerja ( tiada kerja / sedang mencari kerja) | 3 | 6 | 2 |
| Tentera / Polis / Badan Beruniform | 1 | 0 | 0 |
| Pesara / Pencen | 0 | 0 | 0 |
| Memilih tidak menjawab | 1 | 2 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=9.988754127816629 < 18.307038053275146
True
employment_vs_used_public_wifi = relation.distinct_vs_distinct(
normalized_employment, normalized_used_public_wifi, ranked_employment
)
relation.independence_check(employment_vs_used_public_wifi, 0.05)
| used_public_wifi | Tidak | Tidak pasti/ tidak tahu | Ya |
|---|---|---|---|
| employment_status | |||
| Bekerja dengan bergaji (sepenuh masa/ separuh masa) | 34 | 2 | 30 |
| Bekerja sendiri/ pemilik perniagaan | 7 | 0 | 9 |
| Pelajar (sepenuh masa /separuh masa) | 1 | 0 | 5 |
| Tidak bekerja kerana sakit atau kurang upaya | 0 | 0 | 0 |
| Menganggur / tidak bekerja ( tiada kerja / sedang mencari kerja) | 6 | 1 | 4 |
| Tentera / Polis / Badan Beruniform | 1 | 0 | 0 |
| Pesara / Pencen | 0 | 0 | 0 |
| Memilih tidak menjawab | 2 | 1 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=14.889109384284016 < 18.307038053275146
True
employment_vs_used_selangor_wifi = relation.distinct_vs_distinct(
normalized_employment, normalized_used_selangor_wifi, ranked_employment
)
relation.independence_check(
employment_vs_used_selangor_wifi, 0.05
)
| used_selangor_wifi | Tidak | Ya | Tidak pasti/ tidak tahu |
|---|---|---|---|
| employment_status | |||
| Bekerja dengan bergaji (sepenuh masa/ separuh masa) | 40 | 23 | 3 |
| Bekerja sendiri/ pemilik perniagaan | 11 | 5 | 0 |
| Pelajar (sepenuh masa /separuh masa) | 1 | 4 | 1 |
| Tidak bekerja kerana sakit atau kurang upaya | 0 | 0 | 0 |
| Menganggur / tidak bekerja ( tiada kerja / sedang mencari kerja) | 9 | 1 | 1 |
| Tentera / Polis / Badan Beruniform | 1 | 0 | 0 |
| Pesara / Pencen | 0 | 0 | 0 |
| Memilih tidak menjawab | 2 | 0 | 1 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=15.046049091769973 < 18.307038053275146
True
employment_vs_wfh = relation.distinct_vs_distinct(
normalized_employment,
normalized_wfh,
ranked_employment
)
relation.independence_check(employment_vs_wfh, 0.05)
| can_work_from_home | Tidak | Ya | Tidak pasti/ tidak tahu |
|---|---|---|---|
| employment_status | |||
| Bekerja dengan bergaji (sepenuh masa/ separuh masa) | 16 | 39 | 11 |
| Bekerja sendiri/ pemilik perniagaan | 1 | 12 | 3 |
| Pelajar (sepenuh masa /separuh masa) | 0 | 4 | 2 |
| Tidak bekerja kerana sakit atau kurang upaya | 0 | 0 | 0 |
| Menganggur / tidak bekerja ( tiada kerja / sedang mencari kerja) | 0 | 10 | 1 |
| Tentera / Polis / Badan Beruniform | 0 | 1 | 0 |
| Pesara / Pencen | 0 | 0 | 0 |
| Memilih tidak menjawab | 1 | 1 | 1 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=10.800985602291572 < 18.307038053275146
True
employment_vs_comfortable_wfh = relation.distinct_vs_distinct(
normalized_employment,
normalized_comfortable_wfh,
ranked_employment
)
relation.independence_check(employment_vs_comfortable_wfh, 0.05)
| comfy_work_from_home | Tidak | Ya | Tidak pasti/ tidak tahu |
|---|---|---|---|
| employment_status | |||
| Bekerja dengan bergaji (sepenuh masa/ separuh masa) | 25 | 30 | 11 |
| Bekerja sendiri/ pemilik perniagaan | 3 | 12 | 1 |
| Pelajar (sepenuh masa /separuh masa) | 1 | 2 | 3 |
| Tidak bekerja kerana sakit atau kurang upaya | 0 | 0 | 0 |
| Menganggur / tidak bekerja ( tiada kerja / sedang mencari kerja) | 1 | 9 | 1 |
| Tentera / Polis / Badan Beruniform | 0 | 1 | 0 |
| Pesara / Pencen | 0 | 0 | 0 |
| Memilih tidak menjawab | 1 | 1 | 1 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=15.368564199873498 < 18.307038053275146
True
employment_vs_can_elearn = relation.distinct_vs_distinct(
normalized_employment,
normalized_can_elearn,
ranked_employment
)
relation.independence_check(employment_vs_can_elearn, 0.05)
| family_can_elearn | Ya | Tidak | Tidak pasti/ tidak tahu |
|---|---|---|---|
| employment_status | |||
| Bekerja dengan bergaji (sepenuh masa/ separuh masa) | 39 | 17 | 10 |
| Bekerja sendiri/ pemilik perniagaan | 11 | 3 | 2 |
| Pelajar (sepenuh masa /separuh masa) | 4 | 2 | 0 |
| Tidak bekerja kerana sakit atau kurang upaya | 0 | 0 | 0 |
| Menganggur / tidak bekerja ( tiada kerja / sedang mencari kerja) | 9 | 2 | 0 |
| Tentera / Polis / Badan Beruniform | 1 | 0 | 0 |
| Pesara / Pencen | 0 | 0 | 0 |
| Memilih tidak menjawab | 1 | 1 | 1 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=6.111573426573426 < 18.307038053275146
True
employment_vs_comfortable_elearn = relation.distinct_vs_distinct(
normalized_employment, normalized_comfortable_elearn, ranked_employment
)
relation.independence_check(employment_vs_comfortable_elearn, 0.05)
| comfy_elearn | Tidak | Ya | Tidak pasti/ tidak tahu |
|---|---|---|---|
| employment_status | |||
| Bekerja dengan bergaji (sepenuh masa/ separuh masa) | 27 | 25 | 14 |
| Bekerja sendiri/ pemilik perniagaan | 4 | 8 | 4 |
| Pelajar (sepenuh masa /separuh masa) | 2 | 2 | 2 |
| Tidak bekerja kerana sakit atau kurang upaya | 0 | 0 | 0 |
| Menganggur / tidak bekerja ( tiada kerja / sedang mencari kerja) | 3 | 7 | 1 |
| Tentera / Polis / Badan Beruniform | 0 | 1 | 0 |
| Pesara / Pencen | 0 | 0 | 0 |
| Memilih tidak menjawab | 1 | 1 | 1 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=5.927043779316508 < 18.307038053275146
True
employment_vs_budget_internet = relation.distinct_vs_interval(
normalized_employment,
normalized_budget_internet,
ranked_employment,
summary_budget_internet.index,
)
relation.independence_check(employment_vs_budget_internet, 0.05)
| budget internet | (-0.001, 50.0] | (50.0, 100.0] | (100.0, 150.0] | (150.0, 200.0] | (200.0, 250.0] | (250.0, 300.0] | (300.0, 350.0] | (350.0, 400.0] | (400.0, 450.0] | (450.0, 500.0] |
|---|---|---|---|---|---|---|---|---|---|---|
| employment_status | ||||||||||
| Bekerja dengan bergaji (sepenuh masa/ separuh masa) | 35 | 21 | 3 | 5 | 0 | 0 | 0 | 0 | 0 | 1 |
| Bekerja sendiri/ pemilik perniagaan | 10 | 5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Pelajar (sepenuh masa /separuh masa) | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Tidak bekerja kerana sakit atau kurang upaya | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Menganggur / tidak bekerja ( tiada kerja / sedang mencari kerja) | 8 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Tentera / Polis / Badan Beruniform | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Pesara / Pencen | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Memilih tidak menjawab | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=11.638030428353007 < 31.410432844230918
True
employment_vs_budget_computer = relation.distinct_vs_interval(
normalized_employment,
normalized_budget_computer,
ranked_employment,
summary_budget_computer.index,
)
relation.independence_check(
employment_vs_budget_computer, 0.05
)
| budget computer | (-0.001, 100.0] | (100.0, 200.0] | (200.0, 300.0] | (300.0, 400.0] | (400.0, 500.0] | (500.0, 600.0] | (600.0, 700.0] | (700.0, 800.0] |
|---|---|---|---|---|---|---|---|---|
| employment_status | ||||||||
| Bekerja dengan bergaji (sepenuh masa/ separuh masa) | 9 | 4 | 4 | 0 | 7 | 0 | 5 | 2 |
| Bekerja sendiri/ pemilik perniagaan | 1 | 1 | 0 | 0 | 2 | 0 | 0 | 0 |
| Pelajar (sepenuh masa /separuh masa) | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
| Tidak bekerja kerana sakit atau kurang upaya | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Menganggur / tidak bekerja ( tiada kerja / sedang mencari kerja) | 3 | 0 | 0 | 0 | 1 | 0 | 1 | 1 |
| Tentera / Polis / Badan Beruniform | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Pesara / Pencen | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Memilih tidak menjawab | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=15.497734792089632 < 31.410432844230918
True
employment_vs_budget_mobile = relation.distinct_vs_interval(
normalized_employment,
normalized_budget_mobile,
ranked_employment,
summary_budget_mobile.index,
)
relation.independence_check(employment_vs_budget_mobile, 0.05)
| budget mobile | (-0.001, 100.0] | (100.0, 200.0] | (200.0, 300.0] | (300.0, 400.0] | (400.0, 500.0] | (500.0, 600.0] | (600.0, 700.0] | (700.0, 800.0] |
|---|---|---|---|---|---|---|---|---|
| employment_status | ||||||||
| Bekerja dengan bergaji (sepenuh masa/ separuh masa) | 8 | 4 | 7 | 1 | 15 | 3 | 4 | 3 |
| Bekerja sendiri/ pemilik perniagaan | 2 | 1 | 0 | 0 | 3 | 0 | 0 | 2 |
| Pelajar (sepenuh masa /separuh masa) | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 |
| Tidak bekerja kerana sakit atau kurang upaya | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Menganggur / tidak bekerja ( tiada kerja / sedang mencari kerja) | 5 | 0 | 1 | 0 | 2 | 0 | 0 | 1 |
| Tentera / Polis / Badan Beruniform | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Pesara / Pencen | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Memilih tidak menjawab | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 |
Failed to reject H_0 at alpha=0.05 since test statistic chi2=27.046212121212122 < 41.33713815142739
True